public class hdu1715{
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        BigInteger[] fib=new BigInteger[1050];
        fib[1]=BigInteger.ONE;
        fib[2]=BigInteger.ONE;
        for(int i=3;i<=1000;i++){
            fib[i]=fib[i-1].add(fib[i-2]);
        }
        int t=scanner.nextInt();
        while(t>0){
            t--;
            int n=scanner.nextInt();
            System.out.println(fib[n]);
        }
    }
}
